package com.feicheng.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.feicheng.entity.Product;
import com.feicheng.mapper.ProductMapper;
import com.feicheng.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hao.zhang
 * @since 2022-07-04
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {

    //依赖注入商品mapper
    @Autowired
    private ProductMapper productMapper;

    /**
     * 通过产品名称和产品类型获取产品id
     * @author zhennan.liu
     * @param type
     * @param productName
     * @return
     */
    @Override
    public Integer selectByTypeName(String type, String productName) {
        Integer integer = productMapper.selectByTypeName(type, productName);
        Page page = new Page<>(1,20);
        return integer;
    }
}
